// routes/router.go
package routes

import (
	"URLshortener/internal/controller"
	"github.com/gin-gonic/gin"
)

func RegisterRoutes(router *gin.Engine, ctrl *controller.UrlController) {

	// 表单提交
	router.POST("/shorturl", ctrl.HandleFormSubmit)

	// 重定向路由
	router.GET("/:shortCode", ctrl.HandleRedirect)
}
